package cn.matrix42.potoo.format.markdown.conf;

import java.io.Serializable;
import java.util.Objects;

public class MarkdownConfig implements Serializable {

    private EOF eof = EOF.CR;
    private boolean autonumber;

    public void setEof(EOF eof) {
        this.eof = eof;
    }

    public String getEof() {
        return eof.getEoF();
    }

    public boolean isAutonumber() {
        return autonumber;
    }

    public void setAutonumber(boolean autonumber) {
        this.autonumber = autonumber;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        MarkdownConfig that = (MarkdownConfig) o;
        return eof == that.eof;
    }

    @Override
    public int hashCode() {
        return Objects.hash(eof);
    }

    @Override
    public String toString() {
        return "MarkdownConfig{" +
            "eof=" + eof +
            '}';
    }
}
